package com.itheima.dao;

import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 根据用户的名称获取用户的信息
     * @param username
     * @return
     */
    User findByUsername(@Param("username") String username);

    /**
     * 根据用户的id获取用户的角色还有权限
     * @param id
     * @return
     */
    User findByUserId(@Param("id") Integer id);
}